package com.youlai.warehouse.converter;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.youlai.warehouse.model.bo.BasicProductBo;
import com.youlai.warehouse.model.entity.BasicProduct;
import com.youlai.warehouse.model.form.BasicProductForm;
import com.youlai.warehouse.model.vo.BasicProductPageVo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;

/**
 * 产品对象对象转换器
 *
 * @author haoxr
 * @since 2022/6/8
 */
@Mapper(componentModel = "spring")
public interface BasicProductConverter {


    Page<BasicProductPageVo> toPageVo(Page<BasicProductBo> bo);

    @InheritInverseConfiguration(name = "entity2Form")
    BasicProduct form2Entity(BasicProductForm entity);


    BasicProductForm entity2Form(BasicProduct entity);
}
